﻿@{
    ViewBag.Title = "RoleList";
}
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="~/Easy-UI/easyui/1.3.4/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="~/Easy-UI/css/wu.css" />
<link rel="stylesheet" type="text/css" href="~/Easy-UI/css/icon.css" />
<script type="text/javascript" src="~/Easy-UI/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="~/Easy-UI/easyui/1.3.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="~/Easy-UI/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>

<a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add" onclick="$('#dlg').dialog('open')">添加角色</a>
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitcap()">设置权限</a>
<input class="easyui-textbox" name="loan_Contacts" data-options="prompt:'请输入部门名称查询...',validType:'txtname'" style="width:300px;height:24px">
<a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-zoom" onclick="submitcap()">搜索</a>

<table id="tt" class="easyui-datagrid" style="height:auto;">
    <thead>
        <tr>
            <th field="name1" width="70">勾选</th>
            <th field="name2" width="120">角色名称</th>
            <th field="name3" width="200">备注</th>
            <th field="name4" width="90">是否已启用</th>
            <th field="name5" width="140">操作</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var a in Model)
        {
            <tr>
                <td><input type="checkbox" id="check" /></td>
                <td>@a.roles_Name</td>
                <td>@a.roles_Remarks</td>
                @if (a.roles_IsState == 0)
                {
                    <td>未启用</td>
                }
                @if (a.roles_IsState == 1)
                {
                    <td>已启用</td>
                }
                <td><input type="submit" id="del" value="删除" /></td>
            </tr>
        }
    </tbody>
</table>

<div id="dlg" class="easyui-dialog" title="Basic Dialog" data-options="iconCls:'icon-save'" style="width:550px;height:450px;padding:10px">

    <div id="p" class="easyui-panel" title="角色添加"
         style="width:500px;height:auto;padding:10px;background:#fafafa;"
         data-options="iconCls:'icon-save',closable:true,
    collapsible:true,maximizable:true">

        <form action="/House/RoleAddDo" method="post">
            <table style="margin:0 auto;">
                <tr style="text-align:right;margin:0 auto;">
                    <th>角色名称：</th>
                    <td><input class="easyui-textbox" name="loan_Contacts" data-options="prompt:'请输入角色名称...',validType:'txtname'" style="width:300px;height:24px"></td>
                </tr>
                <tr style="text-align:right;margin:0 auto;">
                    <th>备注：</th>
                    <td><input class="easyui-textbox" name="loan_Contacts" data-options="prompt:'请输入备注...',validType:'txtname'" style="width:300px;height:24px"></td>
                </tr>
                <tr>
                    <td colspan=" 2" style="text-align:center;margin-right:50px;">
                        <input type="submit" style="background:#3fabf8;width:54px;height:30px;margin-top:10px;" />
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>